import { useId } from "react"
const App = () => {
  return (
    <>
      <h1>App</h1>
      <A />
      <B />
    </>
  )
}

const A = () => {
  const id = useId()
  return (
    <>
      <h1>A</h1>
      <form>
        <label htmlFor={id + "user"}>用户名：</label>
        <input id={id + "user"} />
      </form>
    </>
  )
}

const B = () => {
  const id = useId()
  return (
    <>
      <h1>B</h1>
      <form>
        <label htmlFor={id + "user"}>用户名：</label>
        <input id={id + "user"} />
      </form>
    </>
  )
}

export default App
